﻿@model ArchivedPostList
@{
    var archivedDates = Model.ArchivedDates.ToString();
    var disqus = Model.Blog.Property().Disqus as string;
    var hasDisqusCode = !string.IsNullOrWhiteSpace(disqus);

    if (!string.IsNullOrWhiteSpace(archivedDates))
    {
        ViewBag.Title = archivedDates;
        ViewBag.MetaDescription = "Post archives of " + archivedDates;
    }
}
<div class="articles hfeed">
    @if (!string.IsNullOrWhiteSpace(archivedDates)) {
        <h2>Archives : @archivedDates</h2>
    }
    @Html.Partial("_SummaryList")
    @Html.Partial("_Pager", new PagedList<IContent>(Model.CurrentPage, Model.Total, Model.PageSize, Model.List))
    @if (hasDisqusCode && Model.List.Any(p => p.AllowComments)){
        @Html.Partial("_CommentCount", disqus)
    }
</div>